/*
 * cmd_err_src.h
 *
 *  Created on: Oct 8, 2011
 *  Author: Mario H. Voorsluys
 *	email: forcaeluz@gmail.com
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, visit:
 * http://www.gnu.org/copyleft/gpl.html
 */

#ifndef CMD_ERR_SRC_H_
#define CMD_ERR_SRC_H_

//Current Revision Number
#define REVNUMBER 	0x0013  //This number should be updated when changes are made that are not backwards compatible.
//Define Message sizes
#define IN_SIZE 	10
#define OUT_SIZE 	10

//Define commands
#define IDENTIFY_COMMAND 	0x01
#define TWI_WRITE	 		0x02
#define TWI_READ	 		0x03
#define ADC_ON				0x04
#define ADC_OFF				0x05
#define ADC_READ			0x06

//Define sources
#define SOURCE_MAIN		0x01
#define SOURCE_TWI 		0x02
#define SOURCE_ADC		0x03
#define SOURCE_ERROR	0xFE

//Define Error Adresses
#define ERROR_GEN	 	0xFEFE
#define ERROR_TWI		0x0001
#define ERROR_ADC		0x0002

//Define General Error numbers
#define INVALID_INPUT	0x0001
#define UNKOWN_COMMAND	0x0002

#endif /* CMD_ERR_SRC_H_ */
